package com.itheima.mapper;

import com.itheima.pojo.Emp;
import com.itheima.pojo.EmpQueryParam;
import com.itheima.pojo.PageResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface EmpMapper {

    //查询总记录数
//    @Select("select count(*) from emp e left join dept d on e.dept_id = d.id ")
//    Long count();



//    @Select("select e.*, d.name deptName from emp as e left join dept as d on e.dept_id = d.id ")
//    List<Emp> list();

    List<Emp> list(EmpQueryParam empQueryParam);

    void deleteEmp(Integer[] ids);


    void addEmp(Emp emp);

    @Select("select * from emp where id =#{id}")
    Emp getInfo(Integer id);
}
